package com.jumper.study.admin.dto.req;

import java.time.LocalDateTime;

import com.jumper.study.common.api.OrderStatusCode;

public class OrderSearchReq {
    private String orderNo;

    private String studentName;

    private String lessonTitle;

    private OrderStatusCode status;

    private Integer minPrice;

    private Integer maxPrice;

    private LocalDateTime startDate;

    private LocalDateTime endDate;

    private Long page;

    private Long limit;

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getStudentName() {
        return studentName;
    }

    public void setStudentName(String studentName) {
        this.studentName = studentName;
    }

    public String getLessonTitle() {
        return lessonTitle;
    }

    public void setLessonTitle(String lessonTitle) {
        this.lessonTitle = lessonTitle;
    }

    public OrderStatusCode getStatus() {
        return status;
    }

    public void setStatus(OrderStatusCode status) {
        this.status = status;
    }

    public Integer getMinPrice() {
        return minPrice;
    }

    public void setMinPrice(Integer minPrice) {
        this.minPrice = minPrice;
    }

    public Integer getMaxPrice() {
        return maxPrice;
    }

    public void setMaxPrice(Integer maxPrice) {
        this.maxPrice = maxPrice;
    }

    public LocalDateTime getStartDate() {
        return startDate;
    }

    public void setStartDate(LocalDateTime startDate) {
        this.startDate = startDate;
    }

    public LocalDateTime getEndDate() {
        return endDate;
    }

    public void setEndDate(LocalDateTime endDate) {
        this.endDate = endDate;
    }

    public Long getPage() {
        return Math.max(1l, page);
    }

    public void setPage(Long page) {
        this.page = page;
    }

    public Long getLimit() {
        if (limit == null || limit < 0) {
            limit = 10l;
        }
        return limit;
    }

    public void setLimit(Long limit) {
        this.limit = limit;
    }
}
